home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / f90 / pxfutime.z / pxfutime
Encoding:
Text File  |  1998-10-30  |  4.5 KB  |  103 lines

  1. PXFUTIME(3F)                                           Last changed: 1-6-98
  2.  
  3.  
  4. NNAAMMEE
  5.      PPXXFFUUTTIIMMEE - Sets access and modification times of a file
  6.  
  7. SSYYNNOOPPSSIISS
  8.      CCHHAARRAACCTTEERR**_n _p_a_t_h
  9.      IINNTTEEGGEERR _i_l_e_n,, _j_u_t_i_m_b_u_f,, _i_e_r_r_o_r
  10.      CCAALLLL PPXXFFUUTTIIMMEE((_p_a_t_h,, _i_l_e_n,, _j_u_t_i_m_b_u_f,, _i_e_r_r_o_r))
  11.  
  12. IIMMPPLLEEMMEENNTTAATTIIOONN
  13.      UNICOS, UNICOS/mk, and IRIX systems
  14.  
  15. SSTTAANNDDAARRDDSS
  16.      IEEE standard interface for FORTRAN 77
  17.  
  18. DDEESSCCRRIIPPTTIIOONN
  19.      On IRIX systems, this routine is in lliibbffoorrttrraann..ssoo which is linked by
  20.      default when compiling programs with the MIPSpro 7 Fortran 90 compiler
  21.      or when compiling programs with the --ccrraayylliibbss option to the MIPSpro
  22.      7.2 F77 compiler.
  23.  
  24.      The routine PPXXFFUUTTIIMMEE provides the functionality of the uuttiimmee(2) system
  25.      call.
  26.  
  27.      When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
  28.      UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
  29.      kind unless documented otherwise.  On UNICOS and UNICOS/mk, default
  30.      kind is KKIINNDD==88 for integer, real, complex, and logical arguments; on
  31.      IRIX, the default kind is KKIINNDD==44.
  32.  
  33.      The following is a list of valid arguments for this routine:
  34.  
  35.      _p_a_t_h        An input character variable or array element containing
  36.                  the name of the file.
  37.  
  38.      _i_l_e_n        An input integer variable containing the length of _p_a_t_h in
  39.                  characters.  If _i_l_e_n is zero, all trailing blanks are
  40.                  removed before calling uuttiimmee.
  41.  
  42.      _j_u_t_i_m_b_u_f    An input integer variable.  It is a handle for a structure
  43.                  of type uuttiimmbbuuff.  The handle must be created by a call to
  44.                  the PPXXFFSSTTRRUUCCTTCCRREEAATTEE(3F) routine prior to the call to
  45.                  PPXXFFUUTTIIMMEE.  The names of the components of the uuttiimmbbuuff
  46.                  structure are _a_c_t_i_m_e and _m_o_d_t_i_m_e.  These components can be
  47.                  accessed through the PPXXFFIINNTTSSEETT subroutine.  The
  48.                  functionality obtained in uuttiimmee by passing a NULL can be
  49.                  obtained in PPXXFFUUTTIIMMEE by passing a handle argument with a
  50.                  value of zero.
  51.  
  52.      _i_e_r_r_o_r      An output integer variable that contains zero if the call
  53.                  to uuttiimmee was successful or nonzero if the call to uuttiimmee
  54.                  was not completed.
  55.  
  56.      In addition to the errors returned by the uuttiimmee(2) system call,
  57.      PPXXFFUUTTIIMMEE may return the following errors:
  58.  
  59.      EEIINNVVAALL       If _i_l_e_n is less than 0 or _i_l_e_n is greater than LLEENN((_p_a_t_h)).
  60.  
  61.      EENNOOMMEEMM       If PPXXFFUUTTIIMMEE is unable to obtain memory to copy _p_a_t_h.
  62.  
  63.      EEBBAADDHHAANNDDLLEE   If _j_u_t_i_m_b_u_f is an invalid handle or has an incorrect
  64.                   handle type (UNICOS and UNICOS/mk systems only).
  65.  
  66. EEXXAAMMPPLLEESS
  67.                 program test
  68.  
  69.                 character*12 filea, fileb
  70.                 integer ilenfila, ilenfilb, jutimbuf, ierr
  71.  
  72.           ! create file
  73.                 open(file='existfile', unit=9, status='NEW')
  74.                 write(9,*) 'HI', 1.2, 11, 'GOODBYE'
  75.                 endfile 9
  76.                 close 9
  77.  
  78.                 filea = 'existfile'
  79.                 ilenfila = 0
  80.                 ilenfilb = 0
  81.  
  82.           ! Set file access and modification time to current time
  83.                 call pxfutime(filea,ilenfila,0,ierr)
  84.                 if (ierr.ne.0) then
  85.                    print *,'FAIL: pxfutime'
  86.                    print *,'nonzero status on existing file = ',ierr
  87.                 else
  88.                    print *,'PASS: pxfutime'
  89.                    print *,'zero status on existing file'
  90.                 endif
  91.  
  92.                 end
  93.  
  94.      The output of this test on a UNICOS system is:
  95.  
  96.           PASS: pxfutime
  97.           zero status on existing file
  98.  
  99. SSEEEE AALLSSOO
  100.      _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-
  101.      2165, for the printed version of this man page.
  102.  
  103.